<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- header -->
<%@ include file="/WEB-INF/views/include/header.jsp"%>
		<script type="text/javascript" src="http://api.map.baidu.com/api?v=3.0&ak=PCTEzZVCWLNzwkThNtrmMwlQrPyKosvT"></script>
		<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script>
<style>
em {
  font-style: normal;
}
.zs-home * {
  font-family: -apple-system, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Helvetica Neue, Arial, sans-serif;
}
#row1 {
  height: 120px;
}
.box {
  width: 100%;
  height: 110px;
  border-radius: 10px;
  color: #fff;
  padding-left: 30%;
  padding-top: 5px;
  padding-bottom: 5px;
  position: relative;
}
.box .box-title {
  font-size: 16px;
}
.box .box-data {
  font-size: 36px;
}
.box .box-unit {
  font-size: 16px;
}
.box img {
  position: absolute;
  top: 24px;
  left: 26px;
}
#box1 {
  background-color: #56d7ab;
  box-shadow: 0 4px 0 #5bc7a2;
}
#box2 {
  background-color: #63d5ff;
  box-shadow: 0 4px 0 #5ac2e9;
}
#box3 {
  background-color: #fed147;
  box-shadow: 0 4px 0 #e0bb4b;
}
#box4 {
  background-color: #ff4c4c;
  box-shadow: 0 4px 0 #e24243;
}
.module-header {
  font-size: 28px;
  font-weight: bold;
  color-profile: #282e45;
  border-left: 8px solid #1fb5ad;
}
.module {
  padding-top: 15px;
  padding-bottom: 15px;
  padding-left: 25px;
  padding-right: 25px;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}
.module h3 {
  font-size: 22px;
  margin: 0;
  margin-bottom: 10px;
}
#total-rate-box {
  position: relative;
  height: 520px;
  text-align: center;
  font-size: 20px;
  padding: 0;
  padding-top: 20px;
}
#total-rate-box .title {
  text-align: center;
  width: 100%;
  position: absolute;
  top: 125px;
  font-size: 24px;
}
#total-rate-box-chart {
  height: 380px;
  width: 100%;
}
#dahao-box,
#qiye-box,
#ztjz-box,
#cy-box {
  height: 250px;
  margin-bottom: 20px;
}
#total-rate-num1 {
  padding-left: 10px;
  border-left: 50px solid #56d7ab;
}
#total-rate-num2 {
  padding-left: 10px;
  border-left: 50px solid #fed147;
}
.progress-container {
  padding-top: 20px;
  padding-bottom: 20px;
  padding-left: 20px;
  padding-right: 20px;
}
.progress {
  border-radius: 5px;
  margin-bottom: 10px;
}
.progress .progress-bar-info-1,
.progress .progress-bar-info-2,
.progress .progress-bar-info-3 {
  font-size: 18px;
}
#dahao-box .progress-bar-1 {
  background-color: #38d180;
}
#dahao-box .progress-bar-info-1 {
  font-size: 18px;
  color: #38d180;
}
#dahao-box .progress-bar-2 {
  background-color: #8e57ff;
}
#dahao-box .progress-bar-info-2 {
  font-size: 18px;
  color: #8e57ff;
}
#qiye-box .progress-bar-1 {
  background-color: #63d5ff;
}
#qiye-box .progress-bar-info-1 {
  font-size: 18px;
  color: #63d5ff;
}
#qiye-box .progress-bar-2 {
  background-color: #ff457e;
}
#qiye-box .progress-bar-info-2 {
  font-size: 18px;
  color: #ff457e;
}
#cy-box .progress-container {
  padding-bottom: 0;
}
#cy-box .progress-bar-1 {
  background-color: #11d77c;
}
#cy-box .progress-bar-info-1 {
  color: #11d77c;
  font-size: 16px;
}
#cy-box .progress-bar-2 {
  background-color: #ffd71e;
}
#cy-box .progress-bar-info-2 {
  color: #ffd71e;
  font-size: 16px;
}
#cy-box .progress-bar-3 {
  background-color: #fe4ae2;
}
#cy-box .progress-bar-info-3 {
  color: #fe4ae2;
  font-size: 16px;
}
#ztjz-chart {
  width: 100%;
  height: 200px;
}
.box2 {
  padding-top: 15px;
  padding-bottom: 15px;
  padding-left: 20px;
  padding-right: 20px;
  color: #fff;
  width: 100%;
  height: 160px;
  border-radius: 10px;
  font-size: 20px;
}
.box2 .box-title {
  font-size: 24px;
  border-bottom: 2px solid #fff;
  padding-bottom: 12px;
}
.box2 .box-data {
  font-size: 36px;
}
#box2-1 {
  background-color: #63d5ff;
  box-shadow: 0 4px 0 #5ac2e9;
}
#box2-2 {
  background-color: #fed147;
  box-shadow: 0 4px 0 #e0bb4b;
}
#box2-3 {
  background-color: #56d7ab;
  box-shadow: 0 4px 0 #5bc7a2;
}
#xscb-chart {
  height: 400px;
}
#rzztl-chart,
#gdlxm-chart {
  height: 440px;
}
#qyfl-chart {
	height: 200px;
}
body {
	background-color: #fff;
}
.shadow-box {
	border-radius: 8px;
	box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
	margin-bottom:18px;
}
.box img {
	left:20px;
}
ul {
	list-style: none;
}
</style>
</head>
<body class="no-skin">
<div class="zs-home container">
    <div class="row" id="row1">
        <div class="col-xs-3">
            <div class="box" id="box1">
                <img src= <s:url value="/assets/dist/img/icon1.png"></s:url> alt="">
                <div class="box-title">总招商额</div>
                <div class="box-data">${summaryDTO.name}</div>
                <div class="box-unit">亿元</div>
            </div>
        </div>
        <div class="col-xs-3">
            <div class="box" id="box2">
                <img src=<s:url value="/assets/dist/img/icon2.png"></s:url>  alt="">
                <div class="box-title">总项目数</div>
                <div class="box-data">${summaryDTO.procount}</div>
                <div class="box-unit">项</div>
            </div>
        </div>
        <div class="col-xs-3">
            <div class="box" id="box3">
                <img src=<s:url value="/assets/dist/img/icon4.png"></s:url>  alt="">
                <div class="box-title">小组数</div>
                <div class="box-data">${teamGroupDTO.count}</div>
                <div class="box-unit">个</div>
            </div>
        </div>
        <div class="col-xs-3">
            <div class="box" id="box4">
                <img src=<s:url value= "/assets/dist/img/icon3.png" ></s:url>  alt="">
                <div class="box-title">线索储备库项目总数</div>
                <div class="box-data">${clueDTO.projectcount}</div>
                <div class="box-unit">个</div>
            </div>
        </div>
    </div>
    <!-- 整体情况 -->
    <div class="row">
        <h2 class="col-xs-12 module-header">整体情况</h2>
        <!-- 总完成 -->
        <div class="col-xs-6">
            <div class="module" id="total-rate-box">
                <p class="title">总完成率</p>
                <div id="total-rate-box-chart"></div>
                <span id="total-rate-num1">完成：<em> </em>亿</span><br>
                <span id="total-rate-num2">剩余：<em> </em>亿</span><br>
                <span id="total-rate-num3">总目标：<em> </em>亿</span>
            </div>
        </div>
        <div class="col-xs-6">
            <!-- 大好 -->
            <div class="module" id="dahao-box">
                <h3>大好项目分类</h3>
                <div class="progress-container clearfix">
                    <div class="progress">
                        <div class="progress-bar progress-bar-1" style="width: 90%;"></div>
                        <div class="progress-bar progress-bar-2" style="width: 10%;"></div>
                    </div>
                    <span class="pull-left progress-bar-info-1">大项目：<em> </em>亿元</span>
                    <span class="pull-right progress-bar-info-2">好项目：<em> </em>亿元</span>
                </div>

                <div class="progress-container clearfix">
                    <div class="progress">
                        <div class="progress-bar progress-bar-1" style="width: 90%;"></div>
                        <div class="progress-bar progress-bar-2" style="width: 10%;"></div>
                    </div>
                    <span class="pull-left progress-bar-info-1">大项目：<em> </em>项</span>
                    <span class="pull-right progress-bar-info-2">好项目：<em> </em>项</span>
                </div>
            </div>
			<!--  产业-->
			<div class="module" id="cy-box">
                <h3>产业分类</h3>
                <div class="progress-container clearfix">
                   <div class="progress">
                        <div class="progress-bar progress-bar-1" style="width: 40%;"></div>
                        <div class="progress-bar progress-bar-2" style="width: 30%;"></div>
                        <div class="progress-bar progress-bar-3" style="width: 30%;"></div>
                    </div>
                    <span class="pull-left progress-bar-info-1">一产<p><em> </em>亿元</p></span>
                    <span class="pull-left progress-bar-info-2">二产<p><em> </em>亿元</p></span>
                    <span class="pull-right progress-bar-info-3">三产<p><em> </em>亿元</p></span>
                </div>
                <div class="progress-container clearfix">
                    <div class="progress">
                        <div class="progress-bar progress-bar-1" style="width: 40%;"></div>
                        <div class="progress-bar progress-bar-2" style="width: 30%;"></div>
                        <div class="progress-bar progress-bar-3" style="width: 30%;"></div>
                    </div>
                    <span class="pull-left progress-bar-info-1">一产<p><em> </em>项</p></span>
                    <span class="pull-left progress-bar-info-2">二产<p><em> </em>项</p></span>
                    <span class="pull-right progress-bar-info-3">三产<p><em> </em>项</p></span>
                </div> 
				
            </div>
           
         
        </div>
        <div class="col-xs-6">
            <!-- 项目整体 -->
            <div class="module" id="ztjz-box">
                <h3>项目整体进展</h3>
                <div id="ztjz-chart"></div>
            </div>
        </div>
        <div class="col-xs-6">
             <!-- 企业 -->
               <div class="module" id="qiye-box">
                <h3>企业分类</h3>
				<div id="qyfl-chart"></div>
              <!--  <div class="progress-container clearfix">
                    <div class="progress">
                        <div class="progress-bar progress-bar-1" style="width: 90%;"></div>
                        <div class="progress-bar progress-bar-2" style="width: 10%;"></div>
                    </div>
                    <span class="pull-left progress-bar-info-1">大项目：<em>307.2</em>亿元</span>
                    <span class="pull-right progress-bar-info-2">好项目：<em>307.2</em>亿元</span>
                </div>

                <div class="progress-container clearfix">
                    <div class="progress">
                        <div class="progress-bar progress-bar-1" style="width: 90%;"></div>
                        <div class="progress-bar progress-bar-2" style="width: 10%;"></div>
                    </div>
                    <span class="pull-left progress-bar-info-1">大项目：<em>123</em>项</span>
                    <span class="pull-right progress-bar-info-2">好项目：<em>22</em>项</span>
                </div>
            </div> -->
			
			<!-- fen-->
        </div>
    </div>
    <div class="row">
	<div class="col-xs-12 shadow-box">
    	<div  id ="allmap" style="width: 100%;height: 500px;" ></div>
		</div>
	</div>
    <div class="row">
        <h2 class="col-xs-12 module-header">各小队情况</h2>
        <div class="col-xs-4">
            <div class="box2" id="box2-1">
                <div class="box-title">专业招商小队</div>
                <div class="pull-left">
                    <p>大项目</p>
                    <p class="box-data">${rate.bigratezy}</p>
                </div>
                <div class="pull-right">
                    <p>好项目</p>
                    <p class="box-data">${rate.goodratezy}</p>
                </div>
            </div>
        </div>
        <div class="col-xs-4">
            <div class="box2" id="box2-2">
                <div class="box-title">乡镇招商小分队</div>
                <div class="pull-left">
                    <p>大项目</p>
                    <p class="box-data">${rate.bigratexz}</p>
                </div>
                <div class="pull-right">
                    <p>好项目</p>
                    <p class="box-data">${rate.goodratexz}</p>
                </div>
            </div>
        </div>
        <div class="col-xs-4">
            <div class="box2" id="box2-3">
                <div class="box-title">有关责任单位项目完成情况</div>
                <div class="pull-left">
                    <p>大项目</p>
                    <p class="box-data">${rate.bigratezr}</p>
                </div>
                <div class="pull-right">
                    <p>好项目</p>
                    <p class="box-data">${rate.goodratezr}</p>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <h2 class="col-xs-12 module-header">线索储备库</h2>
        <div class="col-xs-12">
            <div class="module" id="xscb-chart">
            </div>
        </div>
    </div>
    <div class="row" style="margin-bottom:40px;">
        <div class="col-xs-6">
            <h2 class="col-xs-12 module-header">供地类项目</h2>
            <div id="gdlxm-chart">
            </div>
        </div>
        <div class="col-xs-6">
            <h2 class="col-xs-12 module-header">入住载体类项目</h2>
            <div id="rzztl-chart">
            </div>
        </div>
    </div>
	<div class="row">
        <div class="col-xs-6">
            <h2 class="col-xs-12 module-header">招商需求实时反馈</h2>
            <ul class="module" style="margin: 0;font-size:16px;">
				<li>青莲镇需要300亩用地(2017.02.07)</li>
				<li>长庆镇需要200平供方租置(2017.02.04)</li>
				<li>同安镇需要302亩用地(2017.02.05)</li>
				<li>东洋镇需要100亩用地(2017.02.06)</li>
				<li>更多...</li>
			</ul>
        </div>
        <div class="col-xs-6">
            <h2 class="col-xs-12 module-header">招商供给实时反馈</h2>
            <ul class="module" style="margin: 0;font-size:16px;">
				<li>青莲镇有300亩用地(2017.02.07)</li>
				<li>大洋镇有300亩用地(2017.02.04)</li>
				<li>清凉镇有300亩用地(2017.02.05)</li>
				<li>富泉镇有300亩用地(2017.02.06)</li>
				<li>更多...</li>
			</ul>
        </div>
    </div>
</div>
<script src="<s:url value="/assets/dist/js/echarts.min.js"></s:url>"></script>
<script>
    function Jdt1(option) {
        this.arr1 = option.arr1;
        this.arr2 = option.arr2;
        this.el = option.el;
    }
    Jdt1.prototype.init = function() {
        var $parent = $('#'+this.el+' .progress-container');
        var total1 = (this.arr1[0]+this.arr1[1])/100;
        var total2 = (this.arr2[0]+this.arr2[1])/100;

        $parent.eq(0).find('.progress-bar-info-1 em').text(this.arr1[0]);
        $parent.eq(0).find('.progress-bar-info-2 em').text(this.arr1[1]);
        $parent.eq(0).find('.progress-bar-1').css('width',(this.arr1[0]/total1)+'%');
        $parent.eq(0).find('.progress-bar-2').css('width',(this.arr1[1]/total1)+'%');

        $parent.eq(1).find('.progress-bar-info-1 em').text(this.arr2[0]);
        $parent.eq(1).find('.progress-bar-info-2 em').text(this.arr2[1]);
        $parent.eq(1).find('.progress-bar-1').css('width',(this.arr2[0]/total2)+'%');
        $parent.eq(1).find('.progress-bar-2').css('width',(this.arr2[1]/total2)+'%');
    }

    function Jdt2(option) {
        this.arr1 = option.arr1;
        this.arr2 = option.arr2;
        this.arr3 = option.arr3;
        this.el = option.el;
    }
    Jdt2.prototype.init = function() {
        var $parent = $('#'+this.el+' .progress-container');
        var total1 = (this.arr1[0]+this.arr1[1]+this.arr1[2])/100;
        var total2 = (this.arr2[0]+this.arr2[1]+this.arr2[2])/100;

        $parent.eq(0).find('.progress-bar-info-1 em').text(this.arr1[0]);
        $parent.eq(0).find('.progress-bar-info-2 em').text(this.arr1[1]);
        $parent.eq(0).find('.progress-bar-info-3 em').text(this.arr1[2]);

        $parent.eq(0).find('.progress-bar-info-1').css('width',(this.arr1[0]/total1)/2+'%');
        $parent.eq(0).find('.progress-bar-1').css('width',(this.arr1[0]/total1)+'%');
        $parent.eq(0).find('.progress-bar-2').css('width',(this.arr1[1]/total1)+'%');
        $parent.eq(0).find('.progress-bar-3').css('width',(this.arr1[2]/total1)+'%');

        
        $parent.eq(1).find('.progress-bar-info-1 em').text(this.arr2[0]);
        $parent.eq(1).find('.progress-bar-info-2 em').text(this.arr2[1]);
        $parent.eq(1).find('.progress-bar-info-3 em').text(this.arr2[2]);

        $parent.eq(1).find('.progress-bar-info-1').css('width',(this.arr2[0]/total2)/2+'%');
        $parent.eq(1).find('.progress-bar-1').css('width',(this.arr2[0]/total2)+'%');
        $parent.eq(1).find('.progress-bar-2').css('width',(this.arr2[1]/total2)+'%');
        $parent.eq(1).find('.progress-bar-3').css('width',(this.arr2[2]/total2)+'%');

    }

    // 总完成
    function TotalRate(option) {
        this.totalRateNum1 = option.totalRateNum1;
        this.totalRateNum2 = option.totalRateNum2;
		this.total = option.total;
        this.rate = option.rate;
        this.el = option.el;
    }
    TotalRate.prototype.init = function() {
        var _this = this;
        var option = {
            series: [
                {
                    name:'总完成情况',
                    type:'pie',
                    radius: ['85%', '90%'],
                    avoidLabelOverlap: false,
                    label: {
                        normal: {
                            show: false,
                            position: 'center',
                        },
                    },
                    labelLine: {
                        normal: {
                            show: false
                        }
                    },
                    data:[
                        {
                            value: _this.totalRateNum1, 
                            name: _this.rate+'%',
                            label: {
                                normal: {
                                    show: true,
                                    textStyle: {
                                        color: '#000',
                                        fontSize: '60',
                                    }
                                }
                            },
                            itemStyle: {
                                color: '#56d7ab',
                                shadowBlur: 10,
                                shadowColor: '#56d7ab'
                            }

                        },
                        {
                            value: _this.totalRateNum2,
                            name:'剩余',
                            itemStyle: {
                                color: '#fed147',
                                shadowBlur: 10,
                                shadowColor: '#fed147'
                            }
                        },
                    ]
                }
            ]
        };
        $('#total-rate-num1 em').text(_this.totalRateNum1);
        $('#total-rate-num2 em').text(_this.totalRateNum2);
        $('#total-rate-num3 em').text(_this.total);

        
        var _ec = echarts.init(document.getElementById(_this.el));
        _ec.setOption(option);
        window.addEventListener('resize', function() {
            _ec.resize();
        })
    }
    // 项目整体进展
    function Ztjz(option) {
        this.ztjzNum1 = option.ztjzNum1;
        this.ztjzNum2 = option.ztjzNum2;
        //this.ztjzNum3 = option.ztjzNum3;
        this.el = option.el;
    }
    Ztjz.prototype.init = function() {
        var _this = this;
        option = {
        	    title : {
        	       
        	        x:'center'
        	    },
        	    tooltip : {
        	        trigger: 'item',
        	        formatter: "{a} <br/>{b} : {c} ({d}%)"
        	    },
        	    legend: {
        	        orient : 'vertical',
        	        x : 'left',
        	        data: this.ztjzNum1 
        	    },
        	    toolbox: {
        	        show : true,
        	        feature : {
        	            mark : {show: true},
        	            dataView : {show: true, readOnly: false},
        	            magicType : {
        	                show: true, 
        	                type: ['pie', 'funnel'],
        	                option: {
        	                    funnel: {
        	                        x: '25%',
        	                        width: '50%',
        	                        funnelAlign: 'left',
        	                        max: 1548
        	                    }
        	                }
        	            },
        	            restore : {show: true},
        	            saveAsImage : {show: true}
        	        }
        	    },
        	    calculable : true,
        	    series : [
        	        {
        	            
        	            type:'pie',
        	            radius : '55%',
        	            center: ['50%', '60%'],
        	            data: this.ztjzNum2 /* [
        	                {value:335, name:'直接访问'},
        	                {value:310, name:'邮件营销'},
        	                {value:234, name:'联盟广告'},
        	                {value:135, name:'视频广告'},
        	                {value:1548, name:'搜索引擎'}
        	            ]  */
        	        }
        	    ]
        	};
        var _ec = echarts.init(document.getElementById(_this.el));
        _ec.setOption(option);
        window.addEventListener('resize', function() {
            _ec.resize();
        })
    }
	
	//企业分类
	function Qyfl(option) {
        this.qyflNum1 = option.qyflNum1;
        this.qyflNum2 = option.qyflNum2;
        this.el = option.el;
    }
    Qyfl.prototype.init = function() {
        var _this = this;
        option = {
        	    title : {
        	       
        	        x:'center'
        	    },
        	    tooltip : {
        	        trigger: 'item',
        	        formatter: "{a} <br/>{b} : {c} ({d}%)"
        	    },
        	    legend: {
        	        orient : 'vertical',
        	        x : 'left',
        	        data: this.qyflNum1 //['直接访问','邮件营销','联盟广告','视频广告','搜索引擎'] //this.Num1 
        	    },
        	    toolbox: {
        	        show : true,
        	        feature : {
        	            mark : {show: true},
        	            dataView : {show: true, readOnly: false},
        	            magicType : {
        	                show: true, 
        	                type: ['pie', 'funnel'],
        	                option: {
        	                    funnel: {
        	                        x: '25%',
        	                        width: '50%',
        	                        funnelAlign: 'left',
        	                        max: 1548
        	                    }
        	                }
        	            },
        	            restore : {show: true},
        	            saveAsImage : {show: true}
        	        }
        	    },
        	    calculable : true,
        	    series : [
        	        {
        	           
        	            type:'pie',
        	            radius : '55%',
        	            center: ['50%', '60%'],
        	            data: this.qyflNum2
						
        	        }
        	    ]
        	};
        var _ec = echarts.init(document.getElementById(_this.el));
        _ec.setOption(option);
        window.addEventListener('resize', function() {
            _ec.resize();
        })
    }
	
    // 线索储备
    function Xscb(option) {
        this.arr1 = option.arr1;
        this.arr2 = option.arr2;
        this.arr3 = option.arr3;
        this.arr4 = option.arr4;
        this.el = option.el;
    }
    Xscb.prototype.init = function() {
        var _this = this;
        var option = {
            tooltip : {
                trigger: 'axis'
            },
            legend: {
                data:_this.arr4
            },
            calculable : true,
            xAxis : [
                {
                    type : 'category',
                    data :_this.arr3
                }
            ],
            yAxis : [
                {
                    type : 'value'
                }
            ],
            series : [
                    {
                        name:'项目数',
                        type:'bar',
                        data: _this.arr1,
                        label: {
                            normal: {
                                show: true,
                                position: 'top'
                            },
                        },
                        itemStyle:{
                            normal:{
                                color:'#fed147'
                            }
                        },
                    },
                    {
                        name:'拟定投资额',
                        type:'bar',
                        data: _this.arr2,
                        label: {
                            normal: {
                                show: true,
                                position: 'top'
                            },
                            itemStyle:{
                                normal:{
                                    color:'#000'
                                }
                            },
                        }
                    }
            ]
        };
        var _ec = echarts.init(document.getElementById(_this.el));
        _ec.setOption(option);
        window.addEventListener('resize', function() {
            _ec.resize();
        })
    }

    // 堆叠条形图
    function Txt(option) {
        this.arr1 = option.arr1;
        this.arr2 = option.arr2;
        this.x = option.x,
        this.el = option.el;
    }
    Txt.prototype.init = function() {
        var _this = this;
        var option = {
            tooltip : {
                trigger: 'axis',
                axisPointer : {            // 坐标轴指示器，坐标轴触发有效
                    type : 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
                }
            },
            legend: {
                data: ['本月留存', '本月新增']
            },
            
            yAxis:  {
                type: 'value'
            },
            xAxis: {
                type: 'category',
                data: _this.x
            },
            series: [
                {
                    name: '本月留存',
                    type: 'bar',
                    stack: '总量',
                    label: {
                        normal: {
                            show: true,
                            position: 'insideRight'
                        }
                    },
                    data: _this.arr1,
                    itemStyle:{
                        normal:{
                            color:'#fed147'
                        }
                    },
                    label: {
                        normal: {
                            show: true,
                            textStyle:{
                                fontSize: '15',
                                color: '#000'
                            }
                        },
                    },
                },
                {
                    name: '本月新增',
                    type: 'bar',
                    stack: '总量',
                    data: _this.arr2,
                    itemStyle:{
                        normal:{
                            color:'#63d5ff'
                        }
                    },
                    label: {
                        normal: {
                            show: true,
                            textStyle:{
                                fontSize: '15',
                                color: '#000'
                            }
                        },
                    },
                }
            ]
        };
        var _ec = echarts.init(document.getElementById(_this.el));
        _ec.setOption(option);
        window.addEventListener('resize', function() {
            _ec.resize();
        })
    }

    // 总完成率

	$.ajax({
		type :"GET",
         url : "/chart/show/totalSituation",
         dataType : "json", //返回数据形式为json
         contentType:'application/json;charset=UTF-8',
       
         success:function(result) {
         	
             if (result) {
             	//alert(result.data.category+"  "+result.data.series[0].data+"  "+result.data.legend);
                 //将返回的category和series对象赋值给options对象内的category和series
                 //因为xAxis是一个数组 这里需要是xAxis[i]的形式
                //alert(result.data.legend);
				    var total =result.data.plan;
				    var totalRateNum1 = result.data.finish;
					var totalRateNum2 = total-totalRateNum1;
					totalRateNum2=totalRateNum2.toFixed(2);
					
					var rate = (totalRateNum1/total).toFixed(2)*100;
					//alert(rate);
					var totalRateEl = 'total-rate-box-chart';

                  var option1 = {
					  totalRateNum1: totalRateNum1,
					  totalRateNum2: totalRateNum2,
					  total:total,
					  rate: rate,
					  el: totalRateEl
					};
					
					var totalRate = new TotalRate(option1);
					totalRate.init();
             }
         },
         error : function(errorMsg) {
             alert("图表请求数据失败啦!");
         }
	});
	
	
	
    // 项目整体进展
	$.ajax({
		type :"GET",
        url : "/chart/show/proztzj",//整体进展和企业分类
        dataType : "json", //返回数据形式为json
        contentType:'application/json;charset=UTF-8',
      
        success:function(result) {
        	
            if (result) {
            	//alert(result.data.category+"  "+result.data.series[0].data+"  "+result.data.legend);
                //将返回的category和series对象赋值给options对象内的category和series
                var option2 = {
					        ztjzNum1: result.data.zt.legend,
					        ztjzNum2: result.data.zt.series.data,
							
					        el: 'ztjz-chart'
   					 };
				var ztjz = new Ztjz(option2);
				ztjz.init();
					    var op2 = {
							qyflNum1: result.data.fl.legend,
							qyflNum2: result.data.fl.series.data,
							el: 'qyfl-chart'
							};
							var qyfl = new Qyfl(op2);
							qyfl.init();
				
				
             
            }
        },
        error : function(errorMsg) {
            alert("图表请求数据失败啦!");
        }
		
	}); 
  

    
    
    // 大好项目分类
  
	$.ajax({
		type:"GET",
		url:"/chart/show/goodbigClass",
		dataType:"json",
		contentType:'application/json;charset=UTF-8',
		success:function(result) {
			
			  var op1 = {
					arr1: result.data.arr1,//[307.2,213.7],
					arr2: result.data.arr2, //[223,323],
					el: 'dahao-box'
					};
				var dahao = new Jdt1(op1);
				dahao.init();
				
				    var op3 = {
					arr1: result.data.arr3,//[307.2,210,110],
					arr2: result.data.arr4,//[123,323,155],
					el: 'cy-box'
					};
					var cy = new Jdt2(op3);
					cy.init();
		},
		error:function(errorMsg){
			 alert("图表请求数据失败啦!");
		}
		
	});
	
	
    // 企业分类

    // 产业分类


    // 线索储备库
    $.ajax({
    	 type :"GET",
         url : "/chart/show/clueproject",
         dataType : "json", //返回数据形式为json
         contentType:'application/json;charset=UTF-8',
       
         success:function(result) {
         	
             if (result) {
             	//alert(result.data.category+"  "+result.data.series[0].data+"  "+result.data.legend);
                 //将返回的category和series对象赋值给options对象内的category和series
                 //因为xAxis是一个数组 这里需要是xAxis[i]的形式
                //alert(result.data.legend);
                 var option3 = {
                	        arr1: result.data.series[0].data ,
                	        arr2: result.data.series[1].data ,
                	        arr3: result.data.category,
                	        arr4: result.data.legend,
                	        el: 'xscb-chart'
                	    };
                 
                 var xscb = new Xscb(option3);
                 xscb.init();
                
             }
         },
         error : function(errorMsg) {
             alert("图表请求数据失败啦!");
         }
    });
    
    

    // 供地类项目
    var option4 = {
        arr1: [19,27,48,73,36,86,46,40,35],
        arr2: [21,43,17,14,40,54,70,35,50],
        x:['线索确认','项目洽谈','项目评审','企业注册','发改备案','住建审批','国土审批', '土地出让', '动工'],
        el: 'gdlxm-chart'
    };
    var gdlxm = new Txt(option4);
    gdlxm.init();

    // 入住载体类项目
    var option5 = {
        arr1: [19,27,48,73],
        arr2: [21,43,17,14],
        x:['线索确认','项目洽谈','项目评审','企业注册'],
        el: 'rzztl-chart'
    };
    var rzztl = new Txt(option5);
    rzztl.init();
     //地图
    map = new BMap.Map("allmap");
	//map.centerAndZoom(new BMap.Point(118.95,39.921988), 15);
	map.centerAndZoom("永泰县",12);                
	map.enableScrollWheelZoom();   //启用滚轮放大缩小，默认禁用
	map.enableContinuousZoom(); 
	var data_info = [ 
					 [118.923483,26.040413	,"白云乡  总投资：	69.06	  "],
					 [118.970626,25.873567	,"城峰	  总投资：    0.05	  "],
					 [118.970626,25.873567	,"城峰镇  总投资：	13.0498	  "],
					 [118.865992,25.777302	,"赤锡乡  总投资：	1.8716	  "],
					 [118.793552,25.918811	,"大洋镇  总投资：	7.168	  "],
					 [119.036167,25.996256	,"丹云乡  总投资：	1.15	  "],
					 [118.656147,25.915691	,"东洋乡  总投资：	3.45	  "],
					 [118.480798,25.766369	,"洑口乡  总投资：	1.21	  "],
					 [118.892438,25.839753	,"富泉乡  总投资：	1.4884	  "],
					 [118.498621,25.841834	,"盖洋	  总投资：    0.55	  "],
					 [118.498621,25.841834	,"盖洋乡  总投资：	0.45	  "],
					 [119.088484,25.880849	,"葛岭镇  总投资：	101.5736  "],
					 [118.851619,26.000932	,"红星乡  总投资：	0.38	  "],
					 [118.948205,25.821021	,"岭路乡  总投资：	13.56	  "],
					 [118.815399,25.978068	,"盘谷乡  总投资：	1.476	  "],
					 [118.97695,25.777302	,"青云山  总投资：	0.24	  "],
					 [118.937281,25.901651	,"清凉镇  总投资：	15.19	  "],
					 [118.60153,25.803327	,"嵩口镇  总投资：	69.326	  "],
					 [118.774005,25.836111	,"同安镇  总投资：	35.786	  "],
					 [118.758482,25.732004	,"梧桐镇  总投资：	22.95	  "],
					 [118.705015,25.931288	,"霞拔乡  总投资：	1.35	  "],
					 [118.941306,25.874087	,"樟城镇  总投资：	28.3711	  "],
					 [118.598081,25.88657	,"长庆镇  总投资：	1.9	      "]
					];
					var opts = {
								width : 250,     // 信息窗口宽度
								height: 80,     // 信息窗口高度
								title : "信息窗口" , // 信息窗口标题
								enableMessage:true//设置允许信息窗发送短息
							   };
					for(var i=0;i<data_info.length;i++){
						var marker = new BMap.Marker(new BMap.Point(data_info[i][0],data_info[i][1]));  // 创建标注
						var content = data_info[i][2];
						map.addOverlay(marker);               // 将标注添加到地图中
						addClickHandler(content,marker);
					}
					function addClickHandler(content,marker){
						marker.addEventListener("click",function(e){
							openInfo(content,e)}
						);
					}
					function openInfo(content,e){
						var p = e.target;
						var point = new BMap.Point(p.getPosition().lng, p.getPosition().lat);
						var infoWindow = new BMap.InfoWindow(content,opts);  // 创建信息窗口对象 
						map.openInfoWindow(infoWindow,point); //开启信息窗口
					}
   
</script>
</body>
</html>